from flask import Flask, flash,get_flashed_messages

app = Flask(__name__)
app.secret_key = 'abcdef'


@app.route('/index')
def index():
    flash('xxxx操作成功了','info')
    flash('xxxx操作失败了', 'error')
    return ''

@app.route('/inner')
def inner():
    data = get_flashed_messages(with_categories=True,category_filter=('info',))
    print(data)
    return ''

if __name__ == '__main__':
    app.run()
